import {GraphicsHelper} from "../Helper/GraphicsHelper.js"
class Graphics extends Cesium.Entity{
	constructor(options) {
		super(options.graphics);
		this._group=Cesium.defaultValue(options.group,{});
		this._graphics=Cesium.defaultValue(options.graphics,{});
	}
	getLabel(){
		return Cesium.defaultValue(this._graphics.label,null)
	}
	update(graphics){
		if(Cesium.defined(graphics.label) && Cesium.defined(this.label)){
			GraphicsHelper.createLabel(this.label,graphics.label);
		}
		if(Cesium.defined(graphics.point) && Cesium.defined(this.point)){
			GraphicsHelper.createPoint(this.point,graphics.point);
		}
		if(Cesium.defined(graphics.billboard) && Cesium.defined(this.billboard)){
			GraphicsHelper.createBillboard(this.billboard,graphics.billboard);
		}
	}
}

export {
	Graphics
}
